package com.example.zselasticsearchsf.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.GeoPointField;

/**
 * @Author: Steven
 * @Date: 2021/11/17 8:46
 */

    @Document(indexName = "friends", type = "_doc", createIndex = false)
    @Data
    public class User {
        @Id
        private Long userId;

        @Field(store = true)
        private String userName;

        @Field(store = true)
        @GeoPointField
        private GEO geo;

        @Field(store = true)
        private String place;

    }

